package com.be.beadmin.project.entity;

import com.be.beadmin.common.entity.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * @Description: 付款信息
 * @author: Jiaming Zheng
 * @Date: Create in 16:43 2023/6/13
 * @Modified By:
 **/
@Entity
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Table(name="T_PM_PayInfo")
public class PayInfo extends BaseEntity {
    @Column(name = "InfoId",columnDefinition = "VARCHAR(50) COMMENT '项目Id' not null ")
    private String infoId;
    @Column(name = "AdvancePay",columnDefinition = "float COMMENT '预付款金额(万元)' ")
    private Float advancePay;
    @Column(name = "AdvancePayDate",columnDefinition = "datetime COMMENT '预付款时间'")
    private Date advancePayDate;
    @Column(name = "AdvancePayRate",columnDefinition = "float COMMENT '预付款比例(%)' ")
    private Float advancePayRate;
    @Column(
            name = "IsInvoiceAdvance",
            nullable = false,
            columnDefinition = "decimal(1) default 0 COMMENT '是否已开票' "
    )
    protected Integer isInvoiceAdvance = 0;


    @Column(name = "AdvanceUrl",columnDefinition = "text COMMENT '预付款附件链接'")
    private String advanceUrl;

    @Column(name = "AdvanceFileCode",columnDefinition = "VARCHAR(255) COMMENT '预付款文件编码'")
    private String advancefileCode;

    @Column(name = "AdvanceFileName",columnDefinition = "VARCHAR(255) COMMENT '预付款文件名称'")
    private String advancefileName;

    @Column(name = "AdvanceBucketName",columnDefinition = "VARCHAR(255) COMMENT '预付款MinIO中的bucketName' ")
    private String advancebucketName;


    @Column(name = "StagePayFirst",columnDefinition = "float COMMENT '阶段款1金额(万元)' ")
    private Float stagePayFirst;

    @Column(name = "StagePayDateFirst",columnDefinition = "datetime COMMENT '阶段款1时间'")
    private Date stagePayDateFirst;
    @Column(name = "StagePayRateFirst",columnDefinition = "float COMMENT '阶段款1比例(%)' ")
    private Float stagePayRateFirst;
    @Column(
            name = "IsInvoiceStageFirst",
            nullable = false,
            columnDefinition = "decimal(1) default 0 COMMENT '是否已开票' "
    )
    protected Integer isInvoiceStageFirst = 0;

    @Column(name = "FirstUrl",columnDefinition = "text COMMENT '阶段款1附件链接'")
    private String firstUrl;

    @Column(name = "FirstFileCode",columnDefinition = "VARCHAR(255) COMMENT '阶段款1文件编码'")
    private String firstfileCode;

    @Column(name = "FirstFileName",columnDefinition = "VARCHAR(255) COMMENT '阶段款1文件名称'")
    private String firstfileName;

    @Column(name = "FirstBucketName",columnDefinition = "VARCHAR(255) COMMENT '阶段款1MinIO中的bucketName' ")
    private String firstbucketName;

    @Column(name = "StagePaySecond",columnDefinition = "float COMMENT '阶段款2金额(万元)' ")
    private Float stagePaySecond;

    @Column(name = "StagePayDateSecond",columnDefinition = "datetime COMMENT '阶段款2时间'")
    private Date stagePayDateSecond;
    @Column(name = "StagePayRateSecond",columnDefinition = "float COMMENT '阶段款2比例(%)' ")
    private Float stagePayRateSecond;
    @Column(
            name = "IsInvoiceStageSecond",
            nullable = false,
            columnDefinition = "decimal(1) default 0 COMMENT '是否已开票' "
    )
    protected Integer isInvoiceStageSecond = 0;

    @Column(name = "SecondUrl",columnDefinition = "text COMMENT '阶段款2附件链接'")
    private String secondUrl;

    @Column(name = "SecondFileCode",columnDefinition = "VARCHAR(255) COMMENT '阶段款2文件编码'")
    private String secondfileCode;

    @Column(name = "SecondFileName",columnDefinition = "VARCHAR(255) COMMENT '阶段款2文件名称'")
    private String secondfileName;

    @Column(name = "SecondBucketName",columnDefinition = "VARCHAR(255) COMMENT '阶段款2MinIO中的bucketName' ")
    private String secondbucketName;

    @Column(name = "FinalPay",columnDefinition = "float COMMENT '尾款金额(万元)' ")
    private Float finalPay;

    @Column(name = "FinalPayDate",columnDefinition = "datetime COMMENT '尾款时间'")
    private Date finalPayDate;
    @Column(name = "FinalPayRate",columnDefinition = "float COMMENT '尾款比例(%)' ")
    private Float finalPayRate;

    @Column(
            name = "IsInvoiceFinal",
            nullable = false,
            columnDefinition = "decimal(1) default 0 COMMENT '是否已开票' "
    )
    protected Integer isInvoiceFinal = 0;




    @Column(name = "FinalUrl",columnDefinition = "text COMMENT '尾款附件链接'")
    private String finalUrl;

    @Column(name = "FinalFileCode",columnDefinition = "VARCHAR(255) COMMENT '尾款文件编码'")
    private String finalfileCode;

    @Column(name = "finalFileName",columnDefinition = "VARCHAR(255) COMMENT '尾款文件名称'")
    private String finalfileName;

    @Column(name = "FinalBucketName",columnDefinition = "VARCHAR(255) COMMENT '尾款MinIO中的bucketName' ")
    private String finalbucketName;

    @Column(name = "Memo",columnDefinition = "VARCHAR(50) COMMENT '备注' ")
    private String memo;

}
